package com.rtx.edi.platform.callback.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.rtx.edi.model.response.EdiResponse;
import com.rtx.edi.platform.config.service.PlApiMappingConfigService;

import io.swagger.annotations.Api;

@Api(tags = {"回调"})
@RestController
public class PledicallbackController {
	
	Logger log = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private PlApiMappingConfigService plApiMappingConfigService; 
	
	
	@RequestMapping("/edi/wxb9a70d83a76be98c/callback/cgi/")
	public EdiResponse executeSqlByMappingId(@RequestBody String requestStr,@RequestParam("mappingId")Long mappingId) {
		return EdiResponse.success().data("item", plApiMappingConfigService.executeSqlByMappingId(mappingId,requestStr));
	}

	
}
